﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CustomerPromotions.aspx.vb" Inherits="ccapps.WebForm2" smartNavigation="True"%>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
      <style type="text/css">
	.prompt { BACKGROUND-COLOR: #a2547f; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; padding-top:14px; FONT-FAMILY: Arial, Helvetica, sans-serif; HEIGHT: 30px; COLOR: #ffffff; FONT-SIZE: 12px; FONT-WEIGHT: bold; TEXT-DECORATION: none; }
  
  
    


        .button02 {
			border-style: none;
            border-color: #e6e6fa;
            border-width: 2px;
            font-family: Verdana, Arial; 
		    font-size : 12px; 
		    font-weight : bold;
		    color: #336699;
		    padding : 3px;
		    text-align:center;
		    text-decoration: none;
            width:auto;
            float: right; 
            border-radius:5px;
            }
          .text-alan { 
              width:150px; 
              height:30px; 
              padding-top:5px;
          }
		     .birincisutun {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	text-decoration: none;
	
            padding-left: 10px;
            background-color: #e6e6fa; 
			width:300px;
}
.ikincisutun 
{
	        BACKGROUND-COLOR: #f5f5f5;
            FONT-FAMILY: Arial, Helvetica;
            COLOR: #000000;
            FONT-SIZE: 12px;
            TEXT-DECORATION: none; 
			width:500px;
			border-right:none;
         
} 
.ucuncusutun 
{
	BACKGROUND-COLOR: #f5f5f5;
            FONT-FAMILY: Arial, Helvetica;
            COLOR: #000000;
            FONT-SIZE: 12px;
            TEXT-DECORATION: none;
			width:100px; 
			border-left:none;
			
}
.birsutunlu {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	text-decoration: none;
	
       
            background-color: #e6e6fa; 
			width:900px;
}
   .enusalan {
            BACKGROUND-COLOR:#930051;
       
            FONT-FAMILY: Arial, Helvetica, sans-serif;
            HEIGHT: 30px;
            COLOR: #ffffff;
            FONT-SIZE: 12px;
            FONT-WEIGHT: bold;
            TEXT-DECORATION: none;
             PADDING-LEFT: 10px; PADDING-RIGHT: 10px; padding-top:14px;
         
        }
   
		      	   		.black_overlay{
			display:none;
			position: absolute;
			top: 0%;
			left: 0%;
			width: 1250px;
			height: 1000px;
			background-color: black;
			z-index:1001;
			-moz-opacity: 0.8;
			opacity:.80;
			filter: alpha(opacity=80);
		}
		.white_content {
			display:none;
			position: absolute;
			top: 25%;
			left: 25%;
			width: 500px;
			height: 250px;
			padding: 16px;
			border: 8px solid #930051;
			background-color: white;
			z-index:1002;
			overflow: auto; 
            font-size:large; 
            text-align:center; 
            vertical-align:middle;  
            FONT-FAMILY: Arial, Helvetica, sans-serif; 
            FONT-SIZE: 12px; 
            FONT-WEIGHT: bold;
            border-radius:25px; 

            
            
            
		}
</style>

           <script type = "text/javascript">


               function Confirm2(textbox_id) {
                   var confirm_value = document.createElement("INPUT");
                   confirm_value.type = "hidden";
                   confirm_value.name = "confirm_value";
                   document.forms["form1"].submit();
                   var textbox = document.getElementById(textbox_id);
                   var textlength = textbox.value.length;
                   if (textlength == 11) {
                       if (confirm("Devam Etmeniz Halinde Yeni Bir Müşteri Yaratılacaktır?")) {
                           confirm_value.value = "Yes";
                           deneme2()
                       } else {
                           confirm_value.value = "No";

                       }
                   }
                   else {
                       alert("Tc Kimlik No Alanı Yanlış veya Eksik Bilgi İçeriyor!");
                   }



                   document.forms[0].appendChild(confirm_value);

               }
               function Confirm3() {
                   var confirm_value = document.createElement("INPUT");
                   confirm_value.type = "hidden";
                   confirm_value.name = "confirm_value";
                   document.forms["form1"].submit();

                   if (confirm("Devam Etmeniz Halinde Bir Sonraki Adımda Mevcut Müşteriye Yeni Kontrat Yaratılacak?")) {
                       confirm_value.value = "Yes";
                       deneme2()
                   } else {
                       confirm_value.value = "No";

                   }
                   document.forms[0].appendChild(confirm_value);

               }
               function Confirm() {
                   var confirm_value = document.createElement("INPUT");
                   confirm_value.type = "hidden";
                   confirm_value.name = "confirm_value";
                   document.forms["form1"].submit();
                
                       deneme2()
                  

                   }
           

               
               function deneme2() {
                   setTimeout("uyaricikar()", 1)

               }
               function uyaricikar() {

                   if (Page_IsValid == true) {
                       document.getElementById("light").style.display = "block";
                       document.getElementById("fade").style.display = "block";
                   }
               }


               function upper(ustr) {

                   var str = ustr.value;
                   ustr.value = str.toUpperCase();
               }


               function up() {
                   //if (document.getElementById("srt").value != "") {
                   var dop = document.getElementById("DDL1_ADR_SEMT").value;
                   //}
                   alert(dop);
               }




    </script>
		         
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="ErrorMessage" runat="server"></asp:Label>
        <table width="900">
  <tr>
    <td colspan="3" class="prompt"><asp:label id="lblContextHeader" runat="server">Musterinin Promotion gecmisini ve detaylarini gormek icin bilgisini girin.</asp:label></td>
  </tr>
  <tr>
    <td class="birincisutun">Msisdn<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Bu alanın doldurulması zorunludur" ValidationGroup="groupMSISDN" ControlToValidate="TB_MSISDN" Font-Size="Large" ForeColor="Red">(*)</asp:RequiredFieldValidator>
                        &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="MSISDN Numara Formatı 5051112233 gibi olmalıdır" ControlToValidate="TB_MSISDN" ValidationExpression="^5[0-9]{9}" Font-Size="Large" ForeColor="Red" ValidationGroup="groupMSISDN">(*)</asp:RegularExpressionValidator></td>
    <td class="ikincisutun"> <asp:TextBox ID="TB_MSISDN" runat="server" CssClass="text-alan" MaxLength="10" onkeydown = "return (event.keyCode!=13)"></asp:TextBox></td>
    <td class="ucuncusutun"><asp:Button ID="btnCheckMsisdn" runat="server" CssClass="button02" Width="60px" Text="Getir" ValidationGroup="groupMSISDN" /></td>
  </tr>
  <tr>
    <td class="birincisutun">CustCode <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TB_Custcode" ErrorMessage="CustCode alanın doldurulması zorunludur" SetFocusOnError="True" ValidationGroup="groupCust" Font-Size="Large" ForeColor="Red">(*)</asp:RequiredFieldValidator></td>
    <td class="ikincisutun"> <asp:TextBox ID="TB_Custcode" runat="server" CssClass="text-alan" onkeydown = "return (event.keyCode!=13)"></asp:TextBox></td>
    <td class="ucuncusutun"><asp:button id="btnCheckCustCode" runat="server" Width="60px" CausesValidation="False" CssClass="button02"
							Text="Getir" ValidationGroup="groupCust"></asp:button></td>
  </tr>
  <tr>
    <td class="birincisutun">Customer ID</td>
    <td class="ikincisutun"> <asp:Label ID="lblCustomerID" runat="server"></asp:Label> <asp:Label ID="hiddenCOID" runat="server" Text=" " Visible="false"></asp:Label></td>
    <td class="ucuncusutun">&nbsp;</td>
  </tr>
  <tr>
    <td class="birincisutun">Abone </td>
    <td class="ikincisutun"> <asp:Label ID="lblAbone" runat="server"></asp:Label></td>
    <td class="ucuncusutun"></td>
  </tr>
  <tr>
    <td colspan="3" class="birincisutun" style="width:900px"><asp:Button ID="Button1" runat="server" Text="Göster" OnClientClick="Confirm()"  CssClass="button02" Width="60px" Enabled="False" /></td>
  </tr>
</table>
			<table width="900" class="birsutunlu"  id="PromosyonGrid" runat="server" visible="false">
  <tr>
    <td> <div class="enusalan" id="baslik3" runat="server"> Promotion listesi (detayli gecmisini gormek istediginiz Promotion  seciniz)  </div></td>
  </tr>
  <tr>
    <td ><br /><div class="enusalan" id="baslik" runat="server" visible="false">  <asp:Label ID="Label1" runat="server" Text="Müşteriye Ait Aktif Promosyon Listesi"></asp:Label> </div> </td>
  </tr>
  <tr>
    <td> <asp:datagrid id="DG_CustPromotionList" runat="server" AutoGenerateColumns="False" Width="900px" height="100%" >
				<FooterStyle Font-Size="16px" Font-Names="Arial" ForeColor="White" BackColor="#A2547F"></FooterStyle>
				<ItemStyle Font-Size="16px" Font-Names="Arial" BackColor="Lavender"></ItemStyle>
				<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
				<Columns>
                    <asp:TemplateColumn>
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkSec" Runat="server" CommandName="view">Sec</asp:LinkButton>
                                        </ItemTemplate>
                    </asp:TemplateColumn>
                   
					<asp:BoundColumn DataField="customer_id" HeaderText="Customer ID">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
					<asp:BoundColumn DataField="pack_id" HeaderText="PACK ID" Visible="false">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
					<asp:BoundColumn DataField="promotion_desc" HeaderText="Promosyon Adı">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
                    <asp:BoundColumn DataField="assign_date" HeaderText="Başlangıç Tarihi" DataFormatString="{0:dd.MM.yyyy}">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
					<asp:BoundColumn DataField="assign_seq" HeaderText="Başlangıç Tarihi" Visible="false">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
                    <asp:BoundColumn DataField="delete_date" HeaderText="Bitiş Tarihi" DataFormatString="{0:dd.MM.yyyy}">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>	
					</asp:BoundColumn>
                    
                    	

				</Columns>
				<PagerStyle Font-Size="11px" Font-Names="Arial" HorizontalAlign="Right" ForeColor="White" BackColor="#A2547F"
					Mode="NumericPages"></PagerStyle>
			</asp:datagrid></td>
  </tr>
  <tr>
    <td><br /><div class="enusalan" id="baslik2" runat="server">  Müşteriye Ait Aktif Olmayan Promosyon Listesi </div> </td>
  </tr>
  <tr>
    <td><asp:datagrid id="DG_CustPromotionListDeactive" runat="server" AutoGenerateColumns="False" width="900px" height="100%"  >
				<FooterStyle Font-Size="16px" Font-Names="Arial" ForeColor="White" BackColor="#A2547F"></FooterStyle>
				<ItemStyle Font-Size="16px" Font-Names="Arial" BackColor="Lavender"></ItemStyle>
				<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
				<Columns>
                    <asp:TemplateColumn>
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkSec0" Runat="server" CommandName="view">Sec</asp:LinkButton>
                                        </ItemTemplate>
                    </asp:TemplateColumn>
                   
					<asp:BoundColumn DataField="customer_id" HeaderText="Customer ID">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
					<asp:BoundColumn DataField="pack_id" HeaderText="PACK ID" Visible="false">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
					<asp:BoundColumn DataField="promotion_desc" HeaderText="Promosyon Adı">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
                    <asp:BoundColumn DataField="assign_date" HeaderText="Başlangıç Tarihi" DataFormatString="{0:dd.MM.yyyy}">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
					<asp:BoundColumn DataField="assign_seq" HeaderText="Başlangıç Tarihi" Visible="false">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
                    <asp:BoundColumn DataField="delete_date" HeaderText="Bitiş Tarihi" DataFormatString="{0:dd.MM.yyyy}">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>	
					</asp:BoundColumn>
                    
                    	

				</Columns>
				<PagerStyle Font-Size="11px" Font-Names="Arial" HorizontalAlign="Right" ForeColor="White" BackColor="#A2547F"
					Mode="NumericPages"></PagerStyle>
			</asp:datagrid></td>
  </tr>
  <tr>
    <td><br />  <asp:datagrid id="DG_CustPromotionDetayList" runat="server" AllowPaging="True" PageSize="50" AutoGenerateColumns="False" Width="900px" Height="100%" AllowSorting="True" >
				<FooterStyle Font-Size="16px" Font-Names="Arial" ForeColor="White" BackColor="#A2547F"></FooterStyle>
				<ItemStyle Font-Size="16px" Font-Names="Arial" BackColor="Lavender"></ItemStyle>
				<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
				<Columns>
					<asp:BoundColumn DataField="customer_id" HeaderText="Customer ID">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
					<asp:BoundColumn DataField="seq_no" HeaderText="Sıra No">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
					<asp:BoundColumn DataField="state" HeaderText="Durum">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
					<asp:BoundColumn DataField="valid_from" HeaderText="Başlangıç Tarihi">
						<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#A2547F"></HeaderStyle>
					</asp:BoundColumn>
       
                   

				</Columns>
				<PagerStyle Font-Size="11px" Font-Names="Arial" HorizontalAlign="Right" ForeColor="White" BackColor="#A2547F"
					Mode="NumericPages"></PagerStyle>
			</asp:datagrid></td>
  </tr>
</table>       
	
    
    </div>
          <asp:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="groupMSISDN" />
          <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="groupCust" />

    </form>
      <div id="light" runat="server"  class="white_content"> <img src="../gif/gif-load.gif" /><br /><br />İŞLEMİNİZ YAPILIYOR LÜTFEN BEKLEYİNİZ</div>
		<div id="fade" runat="server" class="black_overlay"></div>
</body>
</html>
